<?php
class Page  extends PageBaseUpdate {

	public function InitializeComponent(){
		parent::InitializeComponent();
		$this->ClassName = "Cajachica";
		$this->LocalControls = "Nrorecibo,Fecha,Concepto,Retiradox,Importe,Fcharqueo,Monto,Detalle";
	}

	public function onLoad($param){
		parent::onLoad($param);

		if(!$this->IsPostBack){

			if($this->Fecha->Text!=""){
				$this->Fecha->Text = date('d-m-Y',strtotime($this->Fecha->Text));
				$this->Fcharqueo->Text = date('d-m-Y',strtotime($this->Fcharqueo->Text));
			}
			if($this->Fcharqueo->Text!=""){
				$this->Fcharqueo->Text = date('d-m-Y',strtotime($this->Fcharqueo->Text));
			}

		}
	}

	protected function btnAceptar_OnClick($sender, $param){
		if($this->IsValid){
			$this->Save();
			$this->Back("?page=Cajachica.Home");
		}
	}

	protected function btnCancelar_OnClick($sender, $param){
		$this->Back("?page=Cajachica.Home");
	}


}